//
//  XLIncomeRecordCell.m
//  XiangLove
//
//  Created by 李传坤 on 2018/7/31.
//  Copyright © 2018年 BAOMIHUA.COM. All rights reserved.
//

#import "XLIncomeRecordCell.h"

@implementation XLIncomeRecordCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        self.contentView.backgroundColor = kWhiteColor;
        [self setupView];
    }
    return self;
}

-(void)setupView
{
    
    
    _headerImageView = [[UIImageView alloc] init];
    _headerImageView.layer.cornerRadius = 5;
    _headerImageView.layer.masksToBounds = YES;
    [self.contentView addSubview:_headerImageView];
    [_headerImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(CGSizeMake(48, 48));
        make.left.equalTo(self.contentView.mas_left).offset(11);
        make.centerY.equalTo(self.contentView);
    }];
    
    _tittleName = [[UILabel alloc] init];
    _tittleName.font = [UIFont systemFontOfSize:16];
    _tittleName.textColor = RGB_HEX(0x000000);
    [self.contentView addSubview:_tittleName];
    [_tittleName mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).offset(65);
        make.top.equalTo(self.contentView.mas_top).offset(21);
        make.right.equalTo(self.contentView.mas_right).offset(-50);
    }];
  
    _inforLabel = [[UILabel alloc] init];
    _inforLabel.textColor = RGB_HEX(0x9395a2);
    _inforLabel.font = [UIFont systemFontOfSize:12];
    [self.contentView addSubview:_inforLabel];
    [_inforLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_tittleName.mas_bottom).offset(6);
        make.left.equalTo(_tittleName.mas_left);
    }];
    _Income            = [[UILabel alloc] init];
    _Income.textColor = RGB_HEX(0xffbb01);
    [self.contentView addSubview:_Income];
    [_Income mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tittleName.mas_top);
        make.right.equalTo(self.contentView.mas_right).offset(-12);
    }];
    
    
    _rightBottomLabel = [[UILabel alloc] init];
    _rightBottomLabel.text = @"";
    _rightBottomLabel.textColor     = kLightGrayColor;
    _rightBottomLabel.font = [UIFont systemFontOfSize:12];
    [self.contentView addSubview:_rightBottomLabel];
    [_rightBottomLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView.mas_right).offset(-12);
        make.top.equalTo(self.inforLabel.mas_top);
    }];
    
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
